import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

import ViewUI from 'view-design';
Vue.use(ViewUI);

import moment from "moment";
window.moment = moment;

import mixin from './mixins/mixin';
Vue.mixin(mixin);


store.dispatch("user/getUserInfo").then(res => {
    if (res) {//判断登录
        new Vue({
            router,
            store,
            render: h => h(App)
        }).$mount('#app')
    } else {
        new Vue({
            router,
            store,
            render: h => h(App)
        }).$mount('#app')
    }

});